<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="../css/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="../css/myfocus.css"/>
	<script type="text/javascript" src="../js/jquery-2.0.3.js"></script>
	<script type="text/javascript" src="../js/rem.js"></script>
		<script type="text/javascript">
			$(window).load(function() {
				$('#box').delay(200).show()
			})
		</script>
	</head>
	<body>
		<!--页面加载 开始-->
		 <!-- <div id="preloader">
		    <div id="status">
		      <p class="center-text"><span>拼命加载中···</span></p>
		    </div>
		  </div>-->
		  <!--页面加载 结束--> 
		<div id="box">
		<!--头部区-->
		<header class="myfocus-head">
				<i onclick="goBack()" class="iconfont">&#xe621;</i>
				<h2>我的关注</h2>
		</header>
		<!--内容区-->
		<section class="myfocus-cont">
			<div class="myfocus-cont-first">
				<div class="myfocus-cont-title clear">
					<p></p>
					<p>关注的游戏</p>
				</div>
				<!--<div class="myfocus-content">
					<img src="../img/bannbg.jpg"/>
					<p>CSGO</p>
					<i class="iconfont">&#xe62a;</i>
				</div>
				<div class="myfocus-content">
					<img src="../img/bannbg.jpg"/>
					<p>CSGO</p>
					<i class="iconfont">&#xe62a;</i>
				</div>
				<div class="myfocus-content">
					<img src="../img/bannbg.jpg"/>
					<p>CSGO</p>
					<i class="iconfont">&#xe62a;</i>
				</div>-->
				<div class="myfocus-content-more">
					<p>COMING SOON</p>
					<p>更多游戏敬请期待</p>
				</div>
			</div>
			<div class="myfocus-cont-second">
				<div class="myfocus-second-title clear">
					<p></p>
					<p>订阅的频道</p>
				</div>
				<div class="myfocus-second-content clear">
					<!--<ul class="myfocus-second-ul">
						<li><img class="myfocus-second-img" src="../img/images/circle_07.jpg"/></li>
						<li>斗鱼TV</li>
						<li>全民直播平台</li>
						<li>已关注</li>
						<li><i class="iconfont myfocus-focus">&#xe62d;</i></li>
					</ul>-->
				</div>
				<div class="myfocus-second-foot">无更多内容</div>
			</div>
			
		</section>
	</div>
	<body>
	</body>
	<script type="text/javascript" src="../js/reset.js"></script>
	<script type="text/javascript" src="../js/iscroll.js"></script>
	<script type="text/javascript">
		$('.myfocus-focus').on('click',function(){
			window.location.href="alreadyfocus.html"
		})
		/*关注的游戏*/
		 var b=localStorage.getItem("user_id")
		 $.ajax({
            type: 'POST',
            url: 'http://192.168.199.114:8080/HJF/user/get_home.do',
            dataType: 'JSON',
            data:{user_id:b},
            success: function(data){
            	/*游戏分类*/
            	$.each(data.game_list, function(index) {
            	  var aLi=$('<div class="myfocus-content">'+
					'<img src="'+data.game_list[index].game_img_url+'"/>'+
					'<p>'+data.game_list[index].game_name+'</p>'+
					'<i class="iconfont">&#xe62a;</i>'+
				'</div>')
            	aLi.insertBefore($('.myfocus-content-more'))
            	});
            	console.log(data.game_list)
            },
            error: function(xhr, type){
            }
       });
       /*关注的频道哦*/
      
       $.ajax({
            type: 'POST',
            url: 'http://192.168.199.114:8080/HJF/user/get_channel_list.do',
            dataType: 'JSON',
            data:{user_id:b},
            success: function(data){
            	console.log(data)
            	/*游戏分类*/
            	$.each(data.data.channel_list, function(index) {
            	  var oUl=$('<ul class="myfocus-second-ul clear">'+
						'<li><img class="myfocus-second-img" src="'+data.data.channel_list[index].channel_head_img_url+'"/></li>'+
						'<li>'+data.data.channel_list[index].channel_name+'</li>'+
						'<li>'+data.data.channel_list[index].channel_summary+'</li>'+
						'<li>已关注</li>'+
						'<li><i class="iconfont myfocus-focus">&#xe62d;</i></li>'+
					'</ul>')
            	$('.myfocus-second-content').append(oUl)
            	$('.myfocus-focus').on('click',function(){
            		var _this=$(this).parent().parent().index()
            		localStorage.setItem('channel_id',data.data.channel_list[_this].channel_id)
            		window.location.href="alreadyfocus.html"
            	})
            	});
            	
            },
            error: function(xhr, type){
            }
       });
      
	</script>
</html>
